package com.qk.management.controller;

import com.qk.common.Result;
import com.qk.dto.business.BusinessTrackRecordDTO;
import com.qk.management.service.BusinessTrackRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 商机跟进记录Controller
 */
@Slf4j
@RestController
@RequestMapping("/businesses")
@SuppressWarnings("all")
public class BusinessTrackRecordController {

    @Autowired
    private BusinessTrackRecordService businessTrackRecordService;

    /**
     * 添加跟进记录
     * @param dto 跟进记录信息
     * @param userId 用户ID（从路径参数获取）
     * @return 操作结果
     */
    @PutMapping
    public Result addTrackRecord(@RequestBody BusinessTrackRecordDTO dto) {
        log.info("添加跟进记录，参数: {}, 用户ID: {}", dto);
        businessTrackRecordService.addTrackRecord(dto);
        return Result.success();
    }


    }
